
interface XiaoLuo {
  name: string;
  age?: number,    //可选属性
  readonly gender: string, //只读属性  readonly 修饰
  // [propName: string]: any, //索引签名
}

interface MoreProp extends XiaoLuo {
  money: number
}

const p: XiaoLuo = {
  name: '小罗',
  age: 18,
  gender: '男',
}

// p.gender = '女' // error

const p2: MoreProp = {
  name: 'xiaomei',
  money: 123,
  gender: '女'
}

